/*jslint node:true*/
'use strict';

var net = require('net');
var server = net.createServer(function (connection) {
    console.log('客户端连接成功');
    connection.on('end', function () {
        console.log('end');
    });
    connection.write('Hello World!\r\n');
    connection.pipe(connection); //不明白这句的作用
});
server.listen(8888, function () {
    console.log('服务器监听端口8888');
});